package com.basics.serviceimpl.ge;

import com.basics.repository.ge.TestMapper;
import com.basics.service.ge.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * @ClassName TestServiceImpl
 * @Author Geordie
 * @Date 2021/7/7 0007 上午 10:25
 * @Annotation
 */
@Service
@CacheConfig(cacheNames = "sdasdsdas")
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class TestServiceImpl implements TestService {
    @Autowired
    TestMapper testMapper;
    @Override
    @Cacheable(value = "11")
    public List<Map<String, Object>> test() {
        return testMapper.test();
    }
}
